import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/NavigationBar.dart';
import 'package:heyangkuaidai/DemonStrateModule/FirstPage.dart';
class RepaySuccessPage extends StatefulWidget {
  String money;
  RepaySuccessPage({this.money});
  @override
  _RepaySuccessPageState createState() => _RepaySuccessPageState();
}

class _RepaySuccessPageState extends State<RepaySuccessPage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 375, height: 667, allowFontScaling: true);
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body: Column(
        children: [
          SizedBox(height: MediaQuery.of(context).padding.top,),
          NavigationBar(false,title: "还款成功",),
          SizedBox(height: ScreenUtil().setWidth(42),),
          Container(
            width: ScreenUtil().setWidth(120),
            height: ScreenUtil().setWidth(85),
            child: Image.asset("sources/yy/repaySuccess.png"),
          ),
          SizedBox(height: ScreenUtil().setWidth(29),),
          Container(
            width: ScreenUtil().setWidth(100),
            child:Text("还款成功",style: TextStyle(fontSize: ScreenUtil().setSp(20),),textAlign: TextAlign.center,),
          ),
          SizedBox(height: ScreenUtil().setWidth(22),),
          Container(
            width: ScreenUtil().setWidth(80),
            child:Text("还款金额",style: TextStyle(fontSize: ScreenUtil().setSp(15),),textAlign: TextAlign.center,),
          ),
          SizedBox(height: ScreenUtil().setWidth(5),),
          Container(
            width: ScreenUtil().setWidth(167),
            child:Text(widget.money+"元",style: TextStyle(fontSize: ScreenUtil().setSp(20),color: Color(0xffFF4646)),textAlign: TextAlign.center,),
          ),
          SizedBox(height: ScreenUtil().setWidth(19),),
          Container(
            width: ScreenUtil().setWidth(314),
            child:Text("还款申请预计3分钟内处理完成，还款成功后额度将实时恢复",style: TextStyle(fontSize: ScreenUtil().setSp(15),),textAlign: TextAlign.center,),
          ),
          SizedBox(height: ScreenUtil().setWidth(23),),
          InkWell(
            onTap: (){
              Navigator.of(context).pushAndRemoveUntil(
                //跳转
                  new MaterialPageRoute(builder: (context) => new FirstPage()),
                  //清除其他路由
                      (route) => route == null
              );
            },
            child: Container(
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(4),
                  color:Color(0xff41A5EE),
                ),
                width: ScreenUtil().setWidth(347),
                height: ScreenUtil().setWidth(44),
                child:Center(
                  child: Text("我知道了",style: TextStyle(fontSize: ScreenUtil().setSp(17),color: Colors.white),textAlign: TextAlign.center,),
                )
            ) ,
          )
        ],
        
      ),
      
    );
  }
}

